package nl.depository.pim.entities;

import java.util.HashMap;

import javax.persistence.Id;

public class Context
{
	@Id
	private String id;
	
	private String name;
	
	private static HashMap<String, Context> contexts = new HashMap<String, Context>();
	
	public static Context forName(String contextName)
	{
		Context context;
		
		if (contexts.containsKey(contextName))
		{
			context = contexts.get(contextName);
		}
		
		context = new Context(contextName);
		
		return context;
	}
	
	private Context(String name)
	{
		this.name = name;
	}
	
	public String getId()
	{
		return id;
	}
	
	public String getName()
	{
		return name;
	}
	
	@Override
	public Object clone() { return null; }
}
